﻿@model DingTalkAgent.Web.Models.Effe_Page
@{
    ViewBag.Title = "成效展示";
    Layout = "~/Areas/mobile/Views/Shared/_Layout.cshtml";
}

<div class="container">
    @Html.Hidden("pageIndex", 1)
    <div>
        <div>
            <div id="list">
                @Html.Partial("List_Partial", Model)
            </div>
        </div>       
    </div>
</div>

<script type="text/javascript">
    $(function () {
        $.post("/mobile/login/init", "url=@ViewBag.url&CorpID=ss", function (_config) {
            dd.config({
                agentId: _config.agentId,
                corpId: _config.corpId,
                timeStamp: _config.timeStamp,
                nonceStr: _config.nonceStr,
                signature: _config.signature,
                jsApiList: ['runtime.info', 'device.notification.prompt', 'biz.chat.pickConversation', 'device.notification.confirm',
           'device.notification.alert',
           'device.notification.prompt',
           'biz.chat.open',
           'biz.util.open', 'device.geolocation.get', 'biz.map.locate', 'biz.map.view', 'biz.util.uploadImageFromCamera',
           'biz.user.get',
           'biz.contact.choose',
           'biz.telephone.call',
           'biz.ding.post']
            });
        dd.ui.pullToRefresh.disable();
        dd.ready(function () {
            dd.ui.pullToRefresh.enable({
                onSuccess: function () {
                    var page = parseInt($("#pageIndex").val()) + 1;
                    $("#pageIndex").val(page)
                    alert("hi3");
                    $.ajax({
                        type: "POST",
                        url: "Index",
                        data: "pageIndex=" + page,
                        success: function (msg) {
                            dd.ui.pullToRefresh.stop();
                            $("#list").append(msg);
                        }
                    });
                },
                onFail: function () {
                }
            });

        });
        dd.error(function (err) {
            alert('dd error: ' + JSON.stringify(err));
        });
        })
    });
</script>



